package shop.utils;

public class PageSupport1 {
    //当前页数
    public  Integer currentPageNo=1;
    //页面展示数量
    public Integer pageSize=0;
    //总条数
    public Integer totalCount=0;
    //总页数
    public Integer totalPageCount=0;

    public Integer getCurrentPageNo() {
        return currentPageNo;
    }

    public void setCurrentPageNo(Integer currentPageNo) {
        this.currentPageNo = currentPageNo;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Integer totalCount) {
        this.totalCount = totalCount;
    }

    public Integer getTotalPageCount() {
        this.totalPageCount= (int) Math.ceil(totalCount/pageSize);
        if(this.totalPageCount<1){
            this.totalPageCount=1;
        }
        return totalPageCount;
    }

    public void setTotalPageCount(Integer totalPageCount) {
        this.totalPageCount = totalPageCount;
    }
}
